﻿// IChatClient.cs is part of AGatherBot.
//
// AGatherBot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 3 as
// published by the Free Software Foundation.
//
// AGatherBot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public version 2 License for more details.
//
// You should have received a copy of the GNU General Public License
// along with AGatherBot. If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;

namespace AGatherBot
{
    [InheritedExport]
    public interface IChatClient : IDisposable
    {
        #region Events

        /// <summary>
        /// 
        /// </summary>
        event EventHandler<ChatMessageEventArgs> OnPrivateMessage;

        /// <summary>
        /// 
        /// </summary>
        event EventHandler<ChatMessageEventArgs> OnChannelMessage;

        #endregion

        #region Properties

        /// <summary>
        /// Gets the name of the chat client.
        /// </summary>
        string Name { get; }

        AGatherManager Parent { get; set; }

        #endregion

        #region Methods

        /// <summary>
        /// Connects the chat client to the chat server.
        /// </summary>
        void Connect();

        /// <summary>
        /// Disconnects the chat client from the chat server.
        /// </summary>
        void Disconnect();

        /// <summary>
        /// Sends a message to the specified targets.
        /// </summary>
        /// <param name="message">The message to send.</param>
        /// <param name="targets">The targets to send the message to.</param>
        void SendMessage(IEnumerable<IAccount> targets, string message);

        #endregion
    }
}
